<?php

declare(strict_types=1);

namespace App\Request;

use Hyperf\Validation\Request\FormRequest;
use Hyperf\Validation\Rule;

class StoreMaterialSheetRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'sheet_name' => 'required',
            'file_type' => 'required',
            'project_id' => 'required',
            'report_num' => 'required',
            'single_score' => 'required',
            'sheet_description' => 'required',
        ];
    }

    public function attributes(): array
    {
        return [
            'sheet_name' => '内容名称',
            'file_type' => '上传文件类型',
            'project_id' => '清单项目id',
            'sheet_description' => '项目描述',
            'report_num' => '上报次数',
            'single_score' => '单次赋分'
        ];
    }
}
